﻿using SerialDemo.Services;
using SerialDemo.ViewModels;
using System.Windows;
using System.Windows.Threading;

namespace SerialDemo
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainView>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<MainView, MainViewModel>();
            containerRegistry.RegisterSingleton<ISerialPortService, SerialPortService>();
            containerRegistry.RegisterInstance<Dispatcher>(Dispatcher.CurrentDispatcher);
        }
    }



}
